﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace ChipSharp
{
    class BouncingBall : CommonMovable
    {

        public BouncingBall(int x, int y, World.Direction dir)
            : base(x, y)
        {
        }

        public override void Step(World world)
        {
            base.Step(world);
        }

        public override void Draw(System.Drawing.Graphics graph, System.Drawing.Rectangle rect)
        {
            Pen pen = new Pen(Color.Black);
            SolidBrush brush = new SolidBrush(Color.Purple);

            Rectangle ballrect = new Rectangle();
            ballrect.X = (rect.Left * 2 + rect.Right) / 3;
            ballrect.Y = (rect.Top * 2 + rect.Bottom) / 3;
            ballrect.Width = rect.Width / 3;
            ballrect.Height = rect.Height / 3;

            graph.FillEllipse(brush, ballrect);
            graph.DrawEllipse(pen, ballrect);

            //base.Draw(graph, ballrect);
        }
    }
}
